1. Field of the Invention
This invention relates generally to binary counter circuits and, in particular, to a Gray code counter that employs a modular type of sequencing.
2. Description of the Prior Art
Binary counters are used in virtually every digital computer or programmable controller, as well as many other types of digital systems. Many binary counters count sequentially, up or down, in accordance with a normal binary sequence. However, counting in a normal binary sequence results in bit pattern changes having multiple bit transitions. Since the bits of a binary counter do not transition at exactly the same instant, a binary counter can generate undesirable transition errors e.g., "glitches", at the output, for example, of decoding circuitry electrically coupled to the counter.
To overcome these problems, Gray code counters are often used. A Gray code is a binary code in which sequential numbers are represented by binary expressions, each of which differs from the preceding expression by one bit in one place only. Thus, Gray code counters have the advantage of providing a virtually glitch-free count sequence. Accordingly, when a low noise counter is required for a particular application, Gray code counters are typically used. For example, Gray code counters are used for applications such as the transmission of telemetry data.
However, Gray code counters have problems of their own. Unlike binary counters, whose individual bit transitions are dependent only upon the logical states of their immediately adjacent bits, a Gray code counter's individual bit transitions are dependent upon the logical state of all other bits within the counter. This has resulted in complex logic and circuit designs based upon complex logic equations representing the expressions or states of the counter required to define the counting sequence. Such complexity increases greatly as more bits are added, i.e., for longer count sequences. Furthermore, the complexity is exacerbated for Gray Counters designed to provide both up and down counting, i.e., incrementing and decrementing count sequences.
The complexity of Gray code counters has been caused by the interdependency of the individual counter bit transitions upon the logical states of all the other counter bits. Such interdependency has produced designs having interconnections for feedback and feedforward paths coupling to or across multiple counter stages. This causes the interconnections to differ from one stage to the next stage.
Many Gray code counter designs use clock signals for the individual counter stages which are not fully synchronous. These asynchronous counters use various means for gating the counter stages' clock signals. Other Gray code counters have been designed to operate completely asynchronously with no clock signal being used by the counter. Instead, these Gray code counters operate as ripple counters.
A Gray code counter's interstage connections are further affected when the counter is designed to provide both incrementing and decrementing count sequences. In this case, several, if not most, counter stages must be interconnected.
The inter-bit dependence of Gray code counters has resulted in counter designs which tend to be unique to each particular application. These prior art Gray code counters must generally be redesigned whenever a bit or bits are to be added to or removed from the count sequence. Such redesign has been further necessitated when it is desired that the Gray code counter selectively increment or decrement during its count sequence.
Furthermore, the inter-bit dependence of Gray code counters has caused this uniqueness of design to extend all the way down to the individual counter stages. The interfaces among the counter stages, including the clock signals, vary from one counter stage to the next. As a result, prior art Gray code counter designs have been either non-modular or non-synchronous, or both.
Thus, it would be desirable to have a Gray code counter design which is modular so that bits may be simply added to or removed from the count sequence by merely adding or removing counter stage modules without affecting the respective interfaces among the remaining counter stages. It would be further desirable to have a synchronous, modular Gray code counter design which can be selectively programmed to count up or down, i.e., increment or decrement during its count sequence.